package me.trytofeel.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

// Tomcat 监听
public class WebConfig extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{SpringConfig.class}; // 加载Spring配置类
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{SpringMvcConfig.class}; // 加载SpringMVC配置类
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"}; // 设置网站要接管的目录
    }
}
